﻿package xiaoneiAPI {
	import flash.events.Event;
	import flash.net.URLLoader;
	import flash.net.URLRequest;
	import flash.net.URLRequestMethod;
	import flash.net.URLVariables;
	
	/**
	* ...
	* @author Default
	*/
	public class Test {
		
		public function Test() {
			send();
		}
		public function send():void {
			var req:URLRequest = new URLRequest("http://api.xiaonei.com/restserver.do")
			var loader:URLLoader = new URLLoader()
			var str:String="v=1.0&api_key=dc9bc09214f94c23aa232458eb5f5ed8&method=xiaonei.users.getLoggedInUser&call_id=1232095295656&session_key=L6Xe8dXVGISZ17LJy7GzZaeYGpeGfeNdqEPLNUtCJfxPCxCRLWT83x+s/Ur94PqP-700001044"
			var urlvar:URLVariables = new URLVariables(str);
			req.method = URLRequestMethod.POST;
			req.data = urlvar;
			loader.load(req);
			loader.addEventListener(Event.COMPLETE, completeHandler);
		}
		private function completeHandler(e:Event) {
			trace(e.target.data);
		}
	}
	
}